package com.yckj.day05;

import java.util.Random;

/**
 * TODO  Random随即类案例
 *
 * @author shengyuee
 * @version 1.0
 * 2025/7/22 11:47
 */
public class RandomDemo {
    public static void main(String[] args) {
        int[] arr = new int[8];
        Random random = new Random();
        for (int i = 0; i < arr.length; i++) {
            arr[i] = random.nextInt(100) + 1; // 生成[1,100]之间的随机数
        }
        for (int ele:arr) {
            System.out.println(ele);
        }
    }
}
